<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      console.log(String(100)); // 数字转字符串 "100"
      console.log(String(true)); // 布尔转字符串 "true"
      console.log(String(undefined)); // undefined转字符串 "true"
      console.log(String(null)); // null转字符串 "true"
      console.log(String(100n)); // 大数转字符串

      // Symbol()
      console.log(String(Symbol())); // Symbol转字符串
      // {}
      console.log(String({})); // 对象转字符串 [object Object]

      // console.log(String("hello"));
    </script>
  </body>
</html>
